package com.xiyu.service.vo.material.info.baseVO;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import jakarta.validation.constraints.NotEmpty;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import static com.xiyu.service.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
import java.time.LocalDateTime;

/**
 * 物资信息 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class MaterialInfoBase {

    @Schema(description = "物资名称")
    @Size(max = 50, message = "物资名称长度不能超过50")
    private String materialName;

    @Schema(description = "物资类别ID")
    private Long categoryId;

    @Schema(description = "物资规格")
    @Size(max = 50, message = "物资规格长度不能超过50")
    private String materialSpecification;

    @Schema(description = "基本单位")
    @Size(max = 50, message = "基本单位长度不能超过50")
    private String unit;

    @Schema(description = "是否停用")
    @Range(max = 127, message = "是否停用最大不能超过127")
    private Integer disable;

    @Schema(description = "销售单价")
    @DecimalMax(value = "10000000000", message = "销售单价最大不能超过10000000000")
    private BigDecimal price;

    @Schema(description = "条码")
    @Size(max = 50, message = "条码长度不能超过50")
    private String barcode;

    @Schema(description = "物资描述")
    @Size(max = 255, message = "物资描述长度不能超过255")
    private String materialDescribe;

}
